﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Domain;

namespace Service
{    
    public class Service : IService
    {
        public User Login(string loginName, string passWord)
        {
            throw new NotImplementedException();
        }

        public void AddUser(User user)
        {
            throw new NotImplementedException();
        }

        public List<User> ListAllUsers()
        {
            using (FlashCardEntities context = new FlashCardEntities())
            {
                var users = from u in context.User select u;
                return users.ToList();
            }            
        }

        public List<Language> ListAvailableLanguages()
        {
            using (FlashCardEntities context = new FlashCardEntities())
            {
                var languages = from l in context.Language select l;
                return languages.ToList();
            }       
        }

    }
}
